package bintree.newcoder;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class 删除公共字符串 {
        public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
           Set<Character> hash = new HashSet<>();
            String str1 = in.nextLine();
            String str2 = in.nextLine();
            for (int i = 0; i < str2.length(); i++) {
                hash.add(str2.charAt(i));
            }
            StringBuffer ret = new StringBuffer();
            for (int j = 0; j < str1.length(); j++) {
                char n = str1.charAt(j);
                if (!hash.contains(n)){
                    ret.append(n);
                }
            }
            System.out.println(ret);
        }
    }
